package com.zt.english.activity.main
import android.os.Bundle
import android.os.Handler
import android.view.KeyEvent
import androidx.appcompat.app.AppCompatActivity
import com.gyf.immersionbar.BarHide
import com.gyf.immersionbar.ImmersionBar
import com.zt.english.R
import com.zt.mvvm.common.utils.gotoActivity

class SplashActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        ImmersionBar.with(this).navigationBarColor(android.R.color.transparent).init()
        Handler().postDelayed(Runnable {
            gotoActivity<MainActivity>(this)
            finish()
        },1500)
    }

    /**
     *防止在启动页时点击back返回键退出
     */
    override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
        return true
    }
}
